<%@ page language="java" import="java.util.*,com.entity.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions"  prefix="fn"%>
<c:if test="${export!=null}">
<%    
response.setContentType("application/xls");    
response.setHeader("Content-Disposition", "inline; filename=\"test.xls\"");    
%> 
</c:if>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns=" http://www.w3.org/1999/xhtml">

  <head>
   	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<link rel="stylesheet" type="text/css" href="css/style.css">
<script src="js/sorttable.js"></script>
<script src="js/main.js"></script>
<script src="js/qy.js"></script>
  </head>
   
  <body>
<div style="display: none;" id="PageHeader" class="PageHeader"></div>
<input type="submit" name="button" id="button" value="查看统计图" onclick="location='txtj.do?falg=1&sname=${sname }&startDate=${startDate}&rysx=${rysx }'" />
<input type="submit" name="button" id="button" value="导出统计表" onclick="location='txtj.do?export=1&sname=${sname }&startDate=${startDate}&rysx=${rysx }'" />
<table class="TableTop" width="100%">
  <tbody><tr>
      <td class="left"></td>
      <td class="center subject">${rysx }  退休人数统计</td>
      <td class="right"></td>
   </tr>
</tbody></table>
<%Dlyh dlyh = (Dlyh)request.getSession().getAttribute("dlyh"); %>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="sortable TableBlock no-top-border">
<thead>
  <tr class="title_text">
    <td align="center"   class="TableData" onclick="this.blur(); return sortTable('offTblBdy',  1, true);">乡级部门</td>
    <td align="center"   class="TableData" onclick="this.blur(); return sortTable('offTblBdy',  2, true);">退休人数</td>
    <%if(!(dlyh.getZd().getTypename().endsWith("市")&&dlyh.getZd().getParentid().equals(745))){ %>
    <td align="center"   class="TableData" onclick="this.blur(); return sortTable('offTblBdy',  2, true);">退休名单</td>
    <%} %>
   <c:if test="${rysx!='乡专干' }">
    <td align="center"   class="TableData" onclick="this.blur(); return sortTable('offTblBdy',  2, true);">应付退休补贴
</td>
   </c:if>
 </tr>
  </thead>
  <TBODY >
  <c:forEach var="l" items="${list}">
  <tr>
    <td align="center" class="TableData">${l[0]}</td>
    <td align="center" class="TableData">${l[1]+l[2]}</td>
    <%if(dlyh.getZd().getTypename().endsWith("市")&&dlyh.getZd().getParentid().equals(745)) {%><%}else{ %>
    <td align="center" class="TableData">
     <%for(int i=0;i<((List)request.getAttribute("list1")).size();i++) {
     request.setAttribute("i",i);
     %>
       <c:forEach var="r" items="${list1[i]}" begin="0" end="5" step="1"> 
        <c:set value="${fn:length(l[0])}" var="leng"></c:set>
	     <c:if test="${fn:indexOf(r.zdByBmbh.zdqc,l[0])!=-1}">
           <c:if test="${fn:substring(r.zdByBmbh.zdqc,0,leng)!=l[0]}">
             <c:set value="${r.zdByBmbh.parentid}" var="bmbh"></c:set>
           </c:if>
           <c:if test="${fn:substring(r.zdByBmbh.zdqc,0,leng)==l[0]}">
             <c:if test="${r.zdByBmbh.zdqc!=l[0]}">
             <c:set value="${r.zdByBmbh.parentid}" var="bmbh"></c:set>
             </c:if>
           </c:if>
           <c:if test="${r.zdByBmbh.zdqc==l[0]}">
             <c:set value="${r.zdByBmbh.id}" var="bmbh"></c:set>
           </c:if>
           <% String rysx =(String)request.getAttribute("rysx");%>
           <a href="txry.do?startDate=${startDate}&rysx=<%=java.net.URLEncoder.encode(rysx ,"UTF-8") %>&bmbh=${bmbh }" title="显示更多人员"> ${r.xm}&nbsp;</a>
	    </c:if>
       </c:forEach>
       <%} %>
    </td>
    <%} %>
    <c:if test="${rysx!='乡专干' }">
    <td align="center" class="TableData">
     <c:if test="${l[1]+l[2]!=0}">
      <c:if test="${l[1]*600+l[2]*50*month!=0}">
        ${l[1]*600+l[2]*50*month}
      </c:if>
      <c:if test="${l[1]*600+l[2]*50*month==0}">
        50
      </c:if>
     </c:if>
     <c:if test="${l[1]+l[2]==0}">
      0
     </c:if>
   </td>
    </c:if>
    </tr>
  </c:forEach>
  </TBODY>
  <tr>
    <td align="center" class="TableData">合计</td>
    <td align="center" class="TableData">${c1}</td>
    <%if(!(dlyh.getZd().getTypename().endsWith("市")&&dlyh.getZd().getParentid().equals(745))){ %>
    <td align="center" class="TableData"></td>
    <%} %>
    <c:if test="${rysx!='乡专干' }">
        <td align="center" class="TableData">${c2}</td>
    </c:if>
    </tr>
</table>

<c:if test="${fn:length(list)==0}">
无数据
</c:if>
  
  </body>
</html>